package com.joseph.test;

/**
 * @description 
 * @author Joseph_Mok
 * @date 2016年4月8日上午11:42:25
 */
public class Singleton03 {
	
	private static volatile Singleton03 singleton = null;
	
	private Singleton03() {
		
	}
	
	public static Singleton03 getInstance() { 
		if (singleton == null) {
			singleton = new Singleton03();
		}
		return singleton;
	}
	
	public static synchronized Singleton03 getInstanceSyn() { 
		if (singleton == null) {
			singleton = new Singleton03();
		}
		return singleton;
	}
	
	public final static Singleton03 getInstanceDCL() { 
		if (singleton == null) {
			synchronized (Singleton03.class) {
				if (singleton == null) {
					singleton = new Singleton03();
				}
			}
		}
		return singleton;
	}
	
}
